﻿package monster.flight.admin.action.xtgl.dict;

import java.util.HashMap;
import java.util.List;

import monster.comm.action.BaseJsonListAction;
import monster.comm.log.ILog;
import monster.comm.log.LogService;
import monster.comm.util.ReturnConstant;
import monster.comm.util.SysConstant;
import monster.flight.admin.manager.service.xtgl.DictService;
import monster.flight.comm.entity.vo.Xt_dict;

/**
 * 
* 创建信息=============
* 类名: monster.flight.admin.action.xtgl.dict.DictListAction
* 类作用描述: 数据字典查询分页
* 创建人： zhongjianjun
* 创建时间： 2013-1-25 上午11:25:17
* 修改信息1=============
* 修改类型:     //1.修改bug 2.业务变化修改
* 修改描述: 
* 修改人：  
* 修改时间：
 */
public class DictListAction extends BaseJsonListAction<DictService,Xt_dict>{
	private static final long serialVersionUID = 1L;
	private static ILog log = LogService.getLog(DictListAction.class);
	private DictService dictService;
	 public List<Xt_dict> list;
	 private Xt_dict xt_dict;
	 
	 public Xt_dict getXt_dict() {
		return xt_dict;
	}
	public void setXt_dict(Xt_dict xt_dict) {
		this.xt_dict = xt_dict;
	}
	public List<Xt_dict> getList() {
		return list;
	}
	
	public void setDictService(DictService dictService) {
		this.dictService = dictService;
	}
	
	public String list(){
			 String islogin = this.isLogin();
			 returnVO.returnCode=islogin;
			 returnVO.returnDesc="程序异常";
			 if("0".equals(islogin)){
				returnVO.returnCode=ReturnConstant.IS_NOT_LOGIN;
		    	returnVO.returnDesc="没有登录";
			 }
			 if("1".equals(islogin)){
				 try {
					 this.pageVO.setPageBarType(SysConstant.page_split_bar_jquery);
					 HashMap<String, Object> map = new HashMap<String, Object>();
					 map.put("condition", xt_dict);
					 map.put("order", "dict_code");
					 list =  doPage(dictService,xt_dict,map);
					 returnVO.returnCode=ReturnConstant.IS_DEAL_OK;
				     returnVO.returnDesc="操作成功";
				} catch (Exception e) {
					returnVO.returnCode=ReturnConstant.IS_ERR;
	        		returnVO.returnDesc="获取数据字典列表失败!";
	        		log.error(e.getMessage());
				}
			 }
		 return "success";
	 }
}